﻿using System.Collections.Generic;
using System.Linq;

namespace EndlessQuizzes.Domain
{
    public class Question
    {
        private readonly IList<string> _alternatives = new List<string>();

        public Question(string question, string correctAnswer, params string[] incorrectAlternatives)
        {
            TheQuestion = question;
            CorrectAnswer = correctAnswer;
            _alternatives.Add(correctAnswer);
            foreach (string incorrectAlternative in incorrectAlternatives)
            {
                _alternatives.Add(incorrectAlternative);
            }
        }

        public string TheQuestion { get; private set; }
        public string CorrectAnswer { get; private set; }
        public string[] Alternatives 
        { 
            get { return _alternatives.ToArray(); } 
        }
    }
}
